﻿using System;
using Quartz;

namespace CoreLibrary.Scheduler {

    public interface ISchedulerService {

        void Unschedule(ITrigger trigger);

        ICancelToken Schedule(Action action, TimeSpan delay);
        ICancelToken Schedule(Action action, ITrigger trigger);

        ICancelToken Schedule(Action<object> action, object argument, TimeSpan delay);
        ICancelToken Schedule(Action<object> action, object argument, ITrigger trigger);
        
        ICancelToken ScheduleFixedDelay (Action<CancellationDelegate> action, TimeSpan initialDelay,   TimeSpan interval);
        ICancelToken ScheduleFixedDelay (Action<object, CancellationDelegate> action, object argument, TimeSpan initialDelay, TimeSpan interval);
        
        ICancelToken ScheduleFixedPeriod(Action<CancellationDelegate> action, TimeSpan initialDelay,   TimeSpan interval);
        ICancelToken ScheduleFixedPeriod(Action<object, CancellationDelegate> action, object argument, TimeSpan initialDelay, TimeSpan interval);
        
    }

}